

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Mod_python Documentation &mdash; Mod_python v3.4.1-3.4.1 documentation</title>
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '',
        VERSION:     '3.4.1-3.4.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <script type="text/javascript" src="_static/sidebar.js"></script>
    <link rel="author" title="About these documents" href="about.html" />
    <link rel="copyright" title="Copyright" href="copyright.html" />
    <link rel="top" title="Mod_python v3.4.1-3.4.1 documentation" href="index.html" />
    <link rel="next" title="Introduction" href="introduction.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="introduction.html" title="Introduction"
             accesskey="N">next</a> |</li>
        <li><a href="#">Mod_python v3.4.1-3.4.1 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="mod-python-documentation">
<h1>Mod_python Documentation<a class="headerlink" href="#mod-python-documentation" title="Permalink to this headline">¶</a></h1>
<p>This document aims to be the only necessary and authoritative source
of information about mod_python, usable as a comprehensive reference,
a user guide and a tutorial all-in-one.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt><a class="reference external" href="http://www.python.org/">Python Language Web Site</a></dt>
<dd>for information on the Python language</dd>
<dt><a class="reference external" href="http://httpd.apache.org/">Apache HTTP Server Project Web Site</a></dt>
<dd>for information on the Apache server</dd>
</dl>
</div>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a><ul>
<li class="toctree-l2"><a class="reference internal" href="introduction.html#performance">Performance</a></li>
<li class="toctree-l2"><a class="reference internal" href="introduction.html#apache-http-server-api">Apache HTTP Server API</a></li>
<li class="toctree-l2"><a class="reference internal" href="introduction.html#other-features">Other Features</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="installation.html#prerequisites">Prerequisites</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#compiling">Compiling</a><ul>
<li class="toctree-l3"><a class="reference internal" href="installation.html#running-configure">Running <tt class="file docutils literal"><span class="pre">./configure</span></tt></a></li>
<li class="toctree-l3"><a class="reference internal" href="installation.html#running-make">Running <tt class="file docutils literal"><span class="pre">make</span></tt></a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#installing">Installing</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#configuring-apache">Configuring Apache</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#testing">Testing</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation.html#troubleshooting">Troubleshooting</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="tutorial.html">Tutorial</a><ul>
<li class="toctree-l2"><a class="reference internal" href="tutorial.html#a-quick-start-with-the-publisher-handler">A Quick Start with the Publisher Handler</a></li>
<li class="toctree-l2"><a class="reference internal" href="tutorial.html#quick-overview-of-how-apache-handles-requests">Quick Overview of how Apache Handles Requests</a></li>
<li class="toctree-l2"><a class="reference internal" href="tutorial.html#so-what-exactly-does-mod-python-do">So what Exactly does Mod-python do?</a></li>
<li class="toctree-l2"><a class="reference internal" href="tutorial.html#now-something-more-complicated-authentication">Now something More Complicated - Authentication</a></li>
<li class="toctree-l2"><a class="reference internal" href="tutorial.html#your-own-404-handler">Your Own 404 Handler</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="pythonapi.html">Python API</a><ul>
<li class="toctree-l2"><a class="reference internal" href="pythonapi.html#multiple-interpreters">Multiple Interpreters</a></li>
<li class="toctree-l2"><a class="reference internal" href="pythonapi.html#overview-of-a-request-handler">Overview of a Request Handler</a></li>
<li class="toctree-l2"><a class="reference internal" href="pythonapi.html#overview-of-a-filter-handler">Overview of a Filter Handler</a></li>
<li class="toctree-l2"><a class="reference internal" href="pythonapi.html#overview-of-a-connection-handler">Overview of a Connection Handler</a></li>
<li class="toctree-l2"><a class="reference internal" href="pythonapi.html#module-apache"><tt class="docutils literal"><span class="pre">apache</span></tt> &#8211; Access to Apache Internals.</a><ul>
<li class="toctree-l3"><a class="reference internal" href="pythonapi.html#functions">Functions</a></li>
<li class="toctree-l3"><a class="reference internal" href="pythonapi.html#attributes">Attributes</a></li>
<li class="toctree-l3"><a class="reference internal" href="pythonapi.html#table-object-mp-table">Table Object (mp_table)</a></li>
<li class="toctree-l3"><a class="reference internal" href="pythonapi.html#request-object">Request Object</a><ul>
<li class="toctree-l4"><a class="reference internal" href="pythonapi.html#request-methods">Request Methods</a></li>
<li class="toctree-l4"><a class="reference internal" href="pythonapi.html#request-members">Request Members</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="pythonapi.html#connection-object-mp-conn">Connection Object (mp_conn)</a><ul>
<li class="toctree-l4"><a class="reference internal" href="pythonapi.html#connection-methods">Connection Methods</a></li>
<li class="toctree-l4"><a class="reference internal" href="pythonapi.html#connection-members">Connection Members</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="pythonapi.html#filter-object-mp-filter">Filter Object (mp_filter)</a><ul>
<li class="toctree-l4"><a class="reference internal" href="pythonapi.html#filter-methods">Filter Methods</a></li>
<li class="toctree-l4"><a class="reference internal" href="pythonapi.html#filter-members">Filter Members</a></li>
<li class="toctree-l4"><a class="reference internal" href="pythonapi.html#server-object-mp-server">Server Object (mp_server)</a></li>
<li class="toctree-l4"><a class="reference internal" href="pythonapi.html#server-methods">Server Methods</a></li>
<li class="toctree-l4"><a class="reference internal" href="pythonapi.html#server-members">Server Members</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="pythonapi.html#module-util"><tt class="docutils literal"><span class="pre">util</span></tt> &#8211; Miscellaneous Utilities</a><ul>
<li class="toctree-l3"><a class="reference internal" href="pythonapi.html#fieldstorage-class">FieldStorage class</a><ul>
<li class="toctree-l4"><a class="reference internal" href="pythonapi.html#fieldstorage-methods"><tt class="docutils literal"><span class="pre">FieldStorage</span></tt> methods</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="pythonapi.html#fieldstorage-examples">FieldStorage Examples</a><ul>
<li class="toctree-l4"><a class="reference internal" href="pythonapi.html#simple-file-control-using-class-constructor">Simple file control using class constructor</a></li>
<li class="toctree-l4"><a class="reference internal" href="pythonapi.html#advanced-file-control-using-object-factory">Advanced file control using object factory</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="pythonapi.html#field-class">Field class</a></li>
<li class="toctree-l3"><a class="reference internal" href="pythonapi.html#other-functions">Other functions</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="pythonapi.html#module-Cookie"><tt class="docutils literal"><span class="pre">Cookie</span></tt> &#8211; HTTP State Management</a><ul>
<li class="toctree-l3"><a class="reference internal" href="pythonapi.html#classes">Classes</a><ul>
<li class="toctree-l4"><a class="reference internal" href="pythonapi.html#pyapi-cookie-func">Functions</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="pythonapi.html#examples">Examples</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="pythonapi.html#module-Session"><tt class="docutils literal"><span class="pre">Session</span></tt> &#8211; Session Management</a><ul>
<li class="toctree-l3"><a class="reference internal" href="pythonapi.html#pyapi-sess-classes">Classes</a></li>
<li class="toctree-l3"><a class="reference internal" href="pythonapi.html#pyapi-sess-example">Examples</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="pythonapi.html#module-psp"><tt class="docutils literal"><span class="pre">psp</span></tt> &#8211; Python Server Pager</a></li>
<li class="toctree-l2"><a class="reference internal" href="pythonapi.html#module-httpdconf"><tt class="docutils literal"><span class="pre">httpdconf</span></tt> &#8211; HTTPd Configuration</a><ul>
<li class="toctree-l3"><a class="reference internal" href="pythonapi.html#classes-for-directive-types">Classes for Directive types</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="directives.html">Apache Configuration Directives</a><ul>
<li class="toctree-l2"><a class="reference internal" href="directives.html#request-handlers">Request Handlers</a><ul>
<li class="toctree-l3"><a class="reference internal" href="directives.html#python-handler-directive-syntax">Python*Handler Directive Syntax</a></li>
<li class="toctree-l3"><a class="reference internal" href="directives.html#python-handlers-and-python-path">Python*Handlers and Python path</a></li>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythonpostreadrequesthandler">PythonPostReadRequestHandler</a></li>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythontranshandler">PythonTransHandler</a></li>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythonheaderparserhandler">PythonHeaderParserHandler</a></li>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythoninithandler">PythonInitHandler</a></li>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythonaccesshandler">PythonAccessHandler</a></li>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythonauthenhandler">PythonAuthenHandler</a></li>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythonauthzhandler">PythonAuthzHandler</a></li>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythontypehandler">PythonTypeHandler</a></li>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythonfixuphandler">PythonFixupHandler</a></li>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythonhandler">PythonHandler</a></li>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythonloghandler">PythonLogHandler</a></li>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythoncleanuphandler">PythonCleanupHandler</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="directives.html#filters">Filters</a><ul>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythoninputfilter">PythonInputFilter</a></li>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythonoutputfilter">PythonOutputFilter</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="directives.html#connection-handler">Connection Handler</a><ul>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythonconnectionhandler">PythonConnectionHandler</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="directives.html#other-directives">Other Directives</a><ul>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythonenablepdb">PythonEnablePdb</a></li>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythondebug">PythonDebug</a></li>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythonimport">PythonImport</a></li>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythoninterpperdirectory">PythonInterpPerDirectory</a></li>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythoninterpperdirective">PythonInterpPerDirective</a></li>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythoninterpreter">PythonInterpreter</a></li>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythonhandlermodule">PythonHandlerModule</a></li>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythonautoreload">PythonAutoReload</a></li>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythonoptimize">PythonOptimize</a></li>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythonoption">PythonOption</a><ul>
<li class="toctree-l4"><a class="reference internal" href="directives.html#reserved-pythonoption-keywords">Reserved PythonOption Keywords</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="directives.html#pythonpath">PythonPath</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="handlers.html">Standard Handlers</a><ul>
<li class="toctree-l2"><a class="reference internal" href="handlers.html#publisher-handler">Publisher Handler</a><ul>
<li class="toctree-l3"><a class="reference internal" href="handlers.html#introduction">Introduction</a></li>
<li class="toctree-l3"><a class="reference internal" href="handlers.html#the-publishing-algorithm">The Publishing Algorithm</a><ul>
<li class="toctree-l4"><a class="reference internal" href="handlers.html#traversal">Traversal</a></li>
<li class="toctree-l4"><a class="reference internal" href="handlers.html#argument-matching-and-invocation">Argument Matching and Invocation</a></li>
<li class="toctree-l4"><a class="reference internal" href="handlers.html#authentication">Authentication</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="handlers.html#form-data">Form Data</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="handlers.html#wsgi-handler">WSGI Handler</a></li>
<li class="toctree-l2"><a class="reference internal" href="handlers.html#psp-handler">PSP Handler</a></li>
<li class="toctree-l2"><a class="reference internal" href="handlers.html#cgi-handler">CGI Handler</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="commandline.html">Command Line Tool - mod_python</a><ul>
<li class="toctree-l2"><a class="reference internal" href="commandline.html#overview-of-mod-python-command">Overview of mod_python command</a></li>
<li class="toctree-l2"><a class="reference internal" href="commandline.html#mod-python-command-line-tool-sub-commands">mod_python command line tool sub-commands</a><ul>
<li class="toctree-l3"><a class="reference internal" href="commandline.html#create">create</a></li>
<li class="toctree-l3"><a class="reference internal" href="commandline.html#genconfig">genconfig</a></li>
<li class="toctree-l3"><a class="reference internal" href="commandline.html#start">start</a></li>
<li class="toctree-l3"><a class="reference internal" href="commandline.html#stop">stop</a></li>
<li class="toctree-l3"><a class="reference internal" href="commandline.html#restart">restart</a></li>
<li class="toctree-l3"><a class="reference internal" href="commandline.html#version">version</a></li>
<li class="toctree-l3"><a class="reference internal" href="commandline.html#example">Example</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="ssi.html">Server Side Includes</a><ul>
<li class="toctree-l2"><a class="reference internal" href="ssi.html#overview-of-ssi">Overview of SSI</a></li>
<li class="toctree-l2"><a class="reference internal" href="ssi.html#using-python-code">Using Python Code</a></li>
<li class="toctree-l2"><a class="reference internal" href="ssi.html#scope-of-global-data">Scope of Global Data</a></li>
<li class="toctree-l2"><a class="reference internal" href="ssi.html#pre-populating-globals">Pre-populating Globals</a></li>
<li class="toctree-l2"><a class="reference internal" href="ssi.html#conditional-expressions">Conditional Expressions</a></li>
<li class="toctree-l2"><a class="reference internal" href="ssi.html#enabling-includes-filter">Enabling INCLUDES Filter</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="changes.html">Changes</a><ul>
<li class="toctree-l2"><a class="reference internal" href="changes.html#changes-from-version-3-3-1">Changes from version 3.3.1</a><ul>
<li class="toctree-l3"><a class="reference internal" href="changes.html#new-features">New Features</a></li>
<li class="toctree-l3"><a class="reference internal" href="changes.html#improvements">Improvements</a></li>
<li class="toctree-l3"><a class="reference internal" href="changes.html#bug-fixes">Bug Fixes</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="changes.html#changes-from-version-3-2-10">Changes from version 3.2.10</a><ul>
<li class="toctree-l3"><a class="reference internal" href="changes.html#id2">New Features</a></li>
<li class="toctree-l3"><a class="reference internal" href="changes.html#id3">Improvements</a></li>
<li class="toctree-l3"><a class="reference internal" href="changes.html#id4">Bug Fixes</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="changes.html#changes-from-version-3-2-8">Changes from version 3.2.8</a><ul>
<li class="toctree-l3"><a class="reference internal" href="changes.html#id5">New Features</a></li>
<li class="toctree-l3"><a class="reference internal" href="changes.html#id6">Improvements</a></li>
<li class="toctree-l3"><a class="reference internal" href="changes.html#id7">Bug Fixes</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="changes.html#changes-from-version-3-2-7">Changes from version 3.2.7</a><ul>
<li class="toctree-l3"><a class="reference internal" href="changes.html#security-fix">Security Fix</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="changes.html#changes-from-version-3-1-4">Changes from version 3.1.4</a><ul>
<li class="toctree-l3"><a class="reference internal" href="changes.html#id9">New Features</a></li>
<li class="toctree-l3"><a class="reference internal" href="changes.html#id10">Improvements</a></li>
<li class="toctree-l3"><a class="reference internal" href="changes.html#id11">Bug Fixes</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="changes.html#changes-from-version-2-x">Changes from version 2.x</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="license.html">History and License</a><ul>
<li class="toctree-l2"><a class="reference internal" href="license.html#history">History</a></li>
<li class="toctree-l2"><a class="reference internal" href="license.html#license">License</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="about.html">About these documents</a></li>
<li class="toctree-l1"><a class="reference internal" href="copyright.html">Copyright</a></li>
</ul>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h4>Next topic</h4>
  <p class="topless"><a href="introduction.html"
                        title="next chapter">Introduction</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/contents.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" size="18" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="introduction.html" title="Introduction"
             >next</a> |</li>
        <li><a href="#">Mod_python v3.4.1-3.4.1 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; <a href="copyright.html">Copyright</a> 1990-2013, Apache Software Foundation, Gregory Trubetskoy.
      Last updated on Oct 22, 2013.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
    </div>
  </body>
</html>